package com.lemon.smartsafety.ui.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Sky on 2015/11/9 0009.
 */
public class ViewPagerAdapter extends FragmentPagerAdapter {
    List<Fragment> list = new ArrayList<Fragment>();




    public ViewPagerAdapter(FragmentManager fragmentManager, List list) {
        super(fragmentManager);
        this.list=list;
    }

    public ViewPagerAdapter(FragmentManager fragmentManager) {
        super(fragmentManager);
    }


    @Override
    public Fragment getItem(int i) {
        return list.get(i);
    }

    @Override
    public int getCount() {
        return list.size();
    }
}
